package course.dao;

import course.pojo.entity.Zhuanye;
import course.pojo.vo.Page;

import java.sql.Connection;
import java.util.List;

/**
 * @author HLF
 * @date 2022/6/30 21:18
 */
public interface ZhuanyeDao {
    Zhuanye getById(Integer zid, Connection connection);

    /**
     * @return 返回自增主键
     */
    int addZhuanye(Zhuanye zhuanye, Connection connection);

    int updateById(Zhuanye zhuanye, Connection connection);

    int deleteById(Integer zid, Connection connection);

    List<Zhuanye> getList(Connection connection);

    /**/

    int deleteSelect(List<Integer> ids, Connection connection);

    long count(Connection connection);

    Page<Zhuanye> page(Integer pageNo, Connection connection);

    Page<Zhuanye> query(String zname, Integer pageNo, Connection connection);

    /**
     * 根据学院id（cid）获取所有专业
     */
    List<Zhuanye> getListByCid(Integer cid, Connection connection);

    Zhuanye getByZname(String zname, Connection connection);

    List<Zhuanye> selectBathByIds(List<Integer> ids,Connection connection);
}
